import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
    state: {
        username: '',
        authToken: ''
    },
    mutations: {
        ['UPDATE_AUTH'](state, payload) {
            state.username = payload.username
            state.authToken = payload.authToken
        }
    }
})